home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_407 / flex / src.lzh / src / Makefile.amiga < prev    next >
Makefile  |  1990-07-14  |  5KB  |  163 lines

  1. # make file for "flex" tool (modified to work with Lattice 5.05)
  2.  
  3. # @(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/Makefile,v 2.9 90/05/26 17:28:44 vern Exp $ (LBL)
  4.  
  5. # Porting considerations:
  6. #
  7. #    For System V Unix machines, add -DUSG to CFLAGS (if it's not
  8. #         automatically defined)
  9. #    For Vax/VMS, add "-DVMS -DUSG" to CFLAGS.
  10. #    For MS-DOS, add "-DMS_DOS -DUSG" to CFLAGS.  Create \tmp if not present.
  11. #         You will also want to rename flex.skel to something with a three
  12. #         character extension, change SKELETON_FILE below appropriately,
  13. #      See MSDOS.notes for more info.
  14. #    For Amiga, add "-DAMIGA -DUSG" to CFLAGS.
  15. #    For SCO Unix, add "-DSCO_UNIX" to CFLAGS.
  16. #
  17. #    For C compilers which don't know about "void", add -Dvoid=int to CFLAGS.
  18. #
  19. #    If your C compiler is ANSI standard but does not include the <stdlib.h>
  20. #    header file (some installations of gcc have this problem), then add
  21. #    -DDONT_HAVE_STDLIB_H to CFLAGS.
  22. #
  23. # By default, flex will be configured to generate 8-bit scanners only
  24. # if the -8 flag is given.  If you want it to always generate 8-bit
  25. # scanners, add "-DDEFAULT_CSIZE=256" to CFLAGS.  Note that doing
  26. # so will double the size of all uncompressed scanners.
  27. # If on your system you have trouble building flex due to 8-bit
  28. # character problems, remove the -8 from FLEX_FLAGS and the
  29. # "#define FLEX_8_BIT_CHARS" from the beginning of flexdef.h.
  30.  
  31.  
  32. # the first time around use "make first_flex"
  33.  
  34.  
  35. # Installation targeting.  Files will be installed under the tree rooted
  36. # at DESTDIR.  User commands will be installed in BINDIR, library files
  37. # in LIBDIR (which will be created if necessary), auxiliary files in
  38. # AUXDIR, manual pages will be installed in MANDIR with extension MANEXT.
  39. # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
  40. # preformatted versions will be installed if INSTALLMAN=cat.
  41. DESTDIR =
  42. BINDIR = c:unix
  43. LIBDIR = s:
  44. AUXDIR = s:
  45. MANDIR = uuman:
  46. MANEXT = doc
  47. INSTALLMAN = man
  48.  
  49. # MAKE = make
  50.  
  51.  
  52. SKELETON_FILE = $(DESTDIR)$(AUXDIR)flex.skel
  53. # Cannot get quotes to work correctly with AmigaDOS and LMK.
  54. # moved this define to flexdef.h (between ifdef AMIGA...endif) wpl 7/14/90
  55. #SKELFLAGS = -dDEFAULT_SKELETON_FILE="$(SKELETON_FILE)"
  56. SKELFLAGS = 
  57. CFLAGS = -O -cwus -dAMIGA -dUSG 
  58. LDFLAGS = -s
  59.  
  60. COMPRESSION =
  61. FLEX_FLAGS = -ist8 -Sflex.skel
  62. # which "flex" to use to generate scan.c from scan.l
  63. FLEX = flex
  64. # CC = cc
  65. YACC = bison
  66. MAKE = lmk
  67. MFLAGS = -f Makefile.amiga
  68.  
  69. FLEXOBJS = \
  70.     ccl.o \
  71.     dfa.o \
  72.     ecs.o \
  73.     gen.o \
  74.     main.o \
  75.     misc.o \
  76.     nfa.o \
  77.     parse.o \
  78.     scan.o \
  79.     sym.o \
  80.     tblcmp.o \
  81.     yylex.o
  82.  
  83. FLEX_C_SOURCES = \
  84.     ccl.c \
  85.     dfa.c \
  86.     ecs.c \
  87.     gen.c \
  88.     main.c \
  89.     misc.c \
  90.     nfa.c \
  91.     parse.c \
  92.     scan.c \
  93.     sym.c \
  94.     tblcmp.c \
  95.     yylex.c
  96.  
  97. all : flex 
  98.  
  99. flex : $(FLEXOBJS)
  100.         blink from lib:c.o $(FLEXOBJS) to flex lib lib:lc.lib lib:amiga.lib
  101.  
  102. first_flex:
  103.     copy initscan.c scan.c
  104.     $(MAKE) $(MFLAGS) flex
  105.  
  106. parse.h parse.c : parse.y
  107.     $(YACC) -d parse.y
  108.     @copy parse.tab.c parse.c
  109.     @copy parse.tab.h parse.h
  110.     @delete parse.tab.c
  111.     @delete parse.tab.h
  112.  
  113. scan.c : scan.l
  114.     $(FLEX) >scan.c $(FLEX_FLAGS) $(COMPRESSION) scan.l
  115.  
  116. scan.o : scan.c parse.h flexdef.h
  117.  
  118. main.o : main.c flexdef.h
  119.     $(CC) $(CFLAGS) $(SKELFLAGS) main.c
  120.  
  121. ccl.o : ccl.c flexdef.h
  122. dfa.o : dfa.c flexdef.h
  123. ecs.o : ecs.c flexdef.h
  124. gen.o : gen.c flexdef.h
  125. misc.o : misc.c flexdef.h
  126. nfa.o : nfa.c flexdef.h
  127. parse.o : parse.c flexdef.h
  128. sym.o : sym.c flexdef.h
  129. tblcmp.o : tblcmp.c flexdef.h
  130. yylex.o : yylex.c flexdef.h
  131.  
  132. install : flex flex.skel
  133.     copy flex $(DESTDIR)$(BINDIR)/flex
  134.     copy flex.skel $(SKELETON_FILE)
  135.  
  136. #install.man : flex.1 flexdoc.1
  137. #    install -c -m 644 flex.1 $(DESTDIR)$(MANDIR)flex.$(MANEXT)
  138. #    install -c -m 644 flexdoc.1 $(DESTDIR)$(MANDIR)flexdoc.$(MANEXT)
  139.  
  140. #install.cat : flex.1 flexdoc.1
  141. #    nroff -h -man flex.1 > $(DESTDIR)$(MANDIR)/flex.$(MANEXT)
  142. #    nroff -h -man flexdoc.1 > $(DESTDIR)$(MANDIR)/flexdoc.$(MANEXT)
  143. #    chmod 644 $(DESTDIR)$(MANDIR)/flex.$(MANEXT)
  144. #    chmod 644 $(DESTDIR)$(MANDIR)/flexdoc.$(MANEXT)
  145.  
  146. #clean :
  147. #    rm -f core errs flex *.o parse.c *.lint parse.h flex.man tags \
  148. #        $(FLEXLIB)
  149.  
  150. #test : flex
  151. #    ./flex $(FLEX_FLAGS) $(COMPRESSION) scan.l | diff scan.c -
  152.  
  153. #bigtest :
  154. #    rm -f scan.c ; $(MAKE) COMPRESSION="-C" test
  155. #    rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" test
  156. #    rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" test
  157. #    rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" test
  158. #    rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" test
  159. #    rm -f scan.c ; $(MAKE) COMPRESSION="-Cf" test
  160. #    rm -f scan.c ; $(MAKE) COMPRESSION="-CF" test
  161. #    rm -f scan.c ; $(MAKE)
  162.